// import Vue from 'vue'
// import Vuex from 'vuex'

const complain = {
  namespaced:true,
  state:{
    complainDate: window.localStorage.getItem('complainDate') || ''
  },
  getters:{
    complainDate: (state) => state.complainDate,
  },
  mutations:{
    // 投诉页选择的日期
    saveComplainDate (state, data) {
      state.complainDate = data
      window.localStorage.setItem('complainDate', data)
    },
    // 清除投诉页选择的日期
    clearComplainDate (state) {
      state.complainDate = null
      // window.localStorage.setItem('accessToken', null)
      window.localStorage.removeItem('complainDate')
    }
  }
}


// Vue.use(Vuex)
//
// export default new Vuex.Store({
//   state: stateData,
//   getters,
//   mutations
// })

export default complain
